import Mock from 'mockjs'

const user = {
  userId:'@string(32)',
  memberId:'111111111',
  phone:13711112222,
  score:'@integer(0,1000000)'
}

//bindPhone的返回数据格式
const bindSuccuss = {//（成功）
  msg:'登录成功',
  status:'success',
  data:Mock.Random.guid().replace(/-/g,'')
}
const bindError = {//（失败）
  msg:'后端返回的错误提示的信息！',
  status:'cancel',
  data:Mock.Random.guid().replace(/-/g,'')
}

const weiXinAuthStatus = {//weiXinAuthStatus的返回数据格式
  status:'success',
  data:{
    bindPhone:true,
    access_token:"15_EArTl2VVRbFjhUHsduaglGM3FIlR3Bz0nBj5N0yUA1BAXoLh7Hn39imoIj04FMaQHQRm_i9W5LhpHtduzvYMmw",
    openid:"o7BcKwKtzeqIkTfLU2KB-UJtaesI",
    refresh_token:"15_ABd_wZg9vV3UsYHWrJ2q_uL0J-pya6h8GaXzd8re4wGkrszQQonyPsZi9a-euhE35NhFOBTtVomSD68B8KGaOA",
    userinfo:{"openid":"o7BcKwKtzeqIkTfLU2KB-UJtaesI","nickname":"明","sex":1,"language":"zh_CN","city":"佛山","province":"广东","country":"中国","headimgurl":"http://thirdwx.qlogo.cn/mmopen/vi_32/jHarwTsjb9wdBEcyUVOl6q8icHxoHy7a03KMySZoqY3FFwyIibnRKrRubjnLSqhDXF7ejDcsFX36aKZT4an9pKNw/132","privilege":[],"userid":"7a689c9dc1e346e1922267d46dd64f18"}
  },
  msg:'后端返回的提示信息'
}

const userInfo = {//getUserInfo的返回数据格式，判断没有登录等情况则返回false
  status:'success',
  data:{
    MEMBER_NUMBER:user.memberId,
    PHONE:user.phone,
    INTEGRAL:user.score
  }
}

const checkCode = {//sendCheckCode的返回数据格式
  status:'success',
  msg:'后端返回的提示信息'
}

const checkRegister = {//checkRegister的返回数据格式
  status:'success',
  data:{
    'name|1':['','@cname']
  }
}

export {user,weiXinAuthStatus,bindSuccuss,bindError,userInfo,checkCode,checkRegister}
